<template>
	<view class="container">
		<rich-text :nodes="agreementData"></rich-text>
	</view>
</template>

<script setup>
import { onLoad, onShow } from '@dcloudio/uni-app';
import { ref } from 'vue';
import { baseAPI } from '@/api/index.js';

//页面公共变量
const agreementId = ref(null);
const agreementData = ref();
// 页面生命周期
onLoad((options) => {
	agreementId.value = options.id;
	loadAgreement();
});
onShow(() => {});

// 页面函数
function loadAgreement() {
	baseAPI
		.get('agreement/getAgreement', {
			id: agreementId.value
		})
		.then((res) => {
			agreementData.value = res.result.content;
		});
}
</script>

<style lang="scss" scoped></style>
